/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-02-17
*/
package com.rzico.basics.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;

/**
 * <pre>
 *   产品档案数据库对象
 * </pre>
 * @author Rzico Boot
 * @version 1.0
 */
@Data
@Table(name = "wx_product")
@JsonIgnoreProperties(value = {"handler"})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MemberTraceVo {

    @ApiModelProperty(value = "创建日期" )
    protected java.util.Date createDate;

    @ApiModelProperty(value = "")
    protected Long id;

    @ApiModelProperty(value = "市场价")
    protected BigDecimal marketPrice;

    @ApiModelProperty(value = "名称")
    protected String name;

    @ApiModelProperty(value = "规格1")
    protected String spec1;

    @ApiModelProperty(value = "规格2")
    protected String spec2;

    @ApiModelProperty(value = "销售价")
    protected BigDecimal price;

    @ApiModelProperty(value = "vip1价")
    protected BigDecimal vip1price;

    @ApiModelProperty(value = "vip2价")
    protected BigDecimal vip2price;

    @ApiModelProperty(value = "vip3价")
    protected BigDecimal vip3price;

    @ApiModelProperty(value = "vip4价")
    protected BigDecimal vip4price;

    @ApiModelProperty(value = "vip5价")
    protected BigDecimal vip5price;

    @ApiModelProperty(value = "商品")
    protected Long goodsId;

    @ApiModelProperty(value = "品牌")
    protected Long brandId;

    @ApiModelProperty(value = "分类")
    protected Long productCategoryId;

    @ApiModelProperty(value = "分类名称")
    protected String productCategoryName;

    @ApiModelProperty(value = "缩略图")
    protected String thumbnail;

    @ApiModelProperty(value = "当前库存")
    protected Integer stock;

    @ApiModelProperty(value = "是否上架")
    protected Boolean isMarketable;

    @ApiModelProperty(value = "品牌名称")
    protected String brandName;

    @ApiModelProperty(value = "描述说明")
    protected String subTitle;

    @ApiModelProperty(value = "最小起订量")
    protected Integer minLimit;

    @ApiModelProperty(value = "日限量")
    protected Integer maxLimit;

    @ApiModelProperty(value = "sku")
    protected Integer sku;

    protected List<PromotionVo> promotions = Collections.emptyList();
    protected List<CouponVo> coupons = Collections.emptyList();

    public String getSpec() {
        if (getSpec1()==null) {
            setSpec1("");
        }
        if (getSpec2()==null) {
            setSpec2("");
        }
        return getSpec1().concat(getSpec2());
    }

}
